package com.jadcon.bedbreakfast.domain;

import java.util.Date;
import java.util.List;

import org.springframework.security.access.annotation.Secured;
import org.springframework.transaction.annotation.Transactional;

public interface ReservationService {
	
	@Secured("ROLE_VIEW_RESERVATION")
	List<Reservation> getReservationList();

	@Secured("ROLE_VIEW_RESERVATION")
	List<Reservation> findByNumber(int reservationNumber);

	@Secured("ROLE_VIEW_RESERVATION")
	List<Reservation> findReservationByRoom(int roomNumber);

	@Secured("ROLE_VIEW_RESERVATION")
	List<Reservation> findReservationByStartDate(Date checkIn);
	
	@Secured("ROLE_VIEW_ALL_RESERVATION")
	List<Reservation> findByUsername(String username);

	List<Suite> equalsDateRange(Date checkIn, Date checkOut);

	boolean SuiteAvailableForReservation(Reservation newReservation);
	
	@Secured("ROLE_VIEW_RESERVATION")
	Reservation getReservationNumberForNewlyCreatedReservation(Reservation reservation);

	@Transactional
	@Secured("ROLE_SAVE_RESERVATION")
	void save(Reservation reservation);

	@Transactional
	@Secured("ROLE_DELETE_RESERVATION")
	void delete(int reservationNumber);
}
